import request from '@/utils/request'


const api_name = `/api/hosp/hospital`

export default {
    //查询医院列表 (后端用的get 没加 @RequestBody 这里用params 不是data)
    getPageList(page, limit, searchObj) { 
        return request({
            url: `${api_name}/findHospList/${page}/${limit}`,
            method: 'get',
            params: searchObj

        })
    },
    //医院名查询
    getByHosname(hosname) { 
        return request({
            url: `${api_name}/findByHosName/${hosname}`,
            method: 'get'
        })
    },
    //医院编号查询医院详细信息
    show(hoscode) {
                return request({
                    url: `${api_name}/findHospDetail/${hoscode}`,
                    method: 'get'
                })
    },
    //医院编号查询科室信息
    findDepartment(hoscode) {
        return request({
            url: `${api_name}/department/${hoscode}`,
            method: 'get'
        })
    },
    //获取可预约的信息
    getBookingScheduleRule(page, limit, hoscode, depcode) {
            return request({
                url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
                method: 'get'
            })
        },
           
    //获取排班信息
        findScheduleList(hoscode, depcode, workDate) {
            return request({
                url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
                method: 'get'
            })
    },
        //根据排班id获取排班数据
    getSchedule(id) {
        return request({
          url: `${api_name}/getSchedule/${id}`,
          method: 'get'
        })
        }
}